<?php include ("header.php"); ?>

<div id="titre">
    <h2><p align="center"> Details Tunnel </p></h2>
</div>
            
<?php 
print_r($_POST);
$libelles = array(  
    "Nom",
    "Concede",
    "Etat tunnel",
    "Geolocalisation",
    "Exploitant",
    "Magali",
    "Eclairage",
    "Ventilation");
print_r($libelles);echo '<br/>';

$base = new Connect_bdd('localhost','rtgs','root','');
$req = 'SELECT nom,concede,id_etat_tunnel,id_geo,id_exploitant,num_Magali,eclairage,ventilation 
        FROM Tunnel
        WHERE id_tunnel = '.$_POST['tunnel'];
echo $req;
$tab = $base->select($req);
$tab = $tab[0];
echo '<br/>';
//print_r($tab);
?>
<table id="tableau" cellspacing="0">
    <caption>Details du tunnel </caption>
    <p></p>
    <tr>
        <!-- <th scope="col">Nom Tunnel</th> -->
    </tr>
    <?php
    //foreach ($tab as $value) { ?>
    <tr>
        <?php
        foreach ($variable as $key => $value) {
            /*
            <td 'class="alt"> </td>
            <td <?php if($i%2) echo 'class="alt"'; ?> ><?php echo $value['nom'];?> <input type="radio" name="tunnel" value=<?php echo $value["id_tunnel"]; ?> > </td>
            # code...
        }
        <?php ///*/?>
    </tr>
    <?php  //$i++; }; ?>
</table>
<p></p>
<label>Nom</label>              <?php echo $tab['nom'];?>
<label>Concede</label>          <?php echo $tab['concede'];?>
<label>Etat tunnel</label>      <?php echo $tab['id_etat_tunnel'];?>
<label>Geolocalisation</label>  <?php echo $tab['id_geo'];?>
<label>Exploitant</label>       <?php echo $tab['id_exploitant'];?>
<label>Magali</label>           <?php echo $tab['num_Magali'];?>
<label>Eclairage</label>        <?php echo $tab['eclairage'];?>
<label>Ventilation</label>      <?php echo $tab['ventilation'];?>

<?php include("footer.php"); ?>